package com.draven.common;

import com.draven.entity.Module;
import com.draven.entity.News;
import com.draven.entity.User;
import com.draven.mapper.ModuleMapper;
import com.draven.mapper.NewsMapper;
import com.draven.mapper.UserMapper;
import com.draven.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * Created by Draven on 2017/4/9.
 * E-mail:draven1122@163.com
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:/spring-mybatis.xml"})
public class JUnitTest {
    @Autowired
    private NewsMapper newsMapper;
    @Test
    public void test(){
        News news = newsMapper.selectByPrimaryKey("1");
        System.out.println(news.getContent());
    }
}
